Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add yoga to app search paths #47195

Closed
wants to merge 1 commit into from

Conversation

cipolleschi
Copy link
Contributor

Summary:
When a user wants to create a Fabric Component i their app (not in a separate library) the app fails to build because:

  • The custom component has to inherit from RCTViewComponentView
  • RCTViewComponentView imports ViewProps.h
  • ViewProps.h imports HostPlatformViewProps.h
  • HostPlatformViewProps.h imports BaseViewProps.h
  • BaseViewProps.h imports YogaStylableProps.h

which is a Yoga private header and the App has not visibility over it.

It is also not possible to fix this issue with forward declaring the YogaStylableProps, because BaseViewProps inherit from the yoga's props, so the compiler needs the full declaration of YogaStylableProps to work

This needs to be picked in 0.76

Changelog

[iOS][Fixed] - Give apps access to Yoga headers

Differential Revision: D64925222

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D64925222

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported p: Facebook Partner: Facebook Partner labels Oct 24, 2024
Summary:
Pull Request resolved: facebook#47195

When a user wants to create a Fabric Component i their app (not in a separate library) the app fails to build because:
- The custom component has to inherit from `RCTViewComponentView`
- `RCTViewComponentView` imports `ViewProps.h`
- `ViewProps.h` imports `HostPlatformViewProps.h`
- `HostPlatformViewProps.h` imports `BaseViewProps.h`
- `BaseViewProps.h` imports `YogaStylableProps.h`

which is a Yoga private header and the App has not visibility over it.

It is also not possible to fix this issue with forward declaring the `YogaStylableProps`, because `BaseViewProps` inherit from the yoga's props, so the compiler needs the full declaration of `YogaStylableProps` to work

This needs to be picked in 0.76

## Changelog
[iOS][Fixed] - Give apps access to Yoga headers

Differential Revision: D64925222
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D64925222

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in e851e73.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Oct 25, 2024
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @cipolleschi in e851e73

When will my fix make it into a release? | How to file a pick request?

blakef pushed a commit that referenced this pull request Nov 12, 2024
Summary:
Pull Request resolved: #47195

When a user wants to create a Fabric Component i their app (not in a separate library) the app fails to build because:
- The custom component has to inherit from `RCTViewComponentView`
- `RCTViewComponentView` imports `ViewProps.h`
- `ViewProps.h` imports `HostPlatformViewProps.h`
- `HostPlatformViewProps.h` imports `BaseViewProps.h`
- `BaseViewProps.h` imports `YogaStylableProps.h`

which is a Yoga private header and the App has not visibility over it.

It is also not possible to fix this issue with forward declaring the `YogaStylableProps`, because `BaseViewProps` inherit from the yoga's props, so the compiler needs the full declaration of `YogaStylableProps` to work

This needs to be picked in 0.76

## Changelog
[iOS][Fixed] - Give apps access to Yoga headers

Reviewed By: blakef

Differential Revision: D64925222

fbshipit-source-id: e724076bbfb0a678948340dfab2ce609e6509533
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants